/*
Building a Clean and Loyal State: The Strategic Dilemma of an Anti-corruption Campaign Under One-Party Rule
Authors: Tianyang Xi, Yang Yao and Qian Zhang
Date: Oct, 30, 2023
Stata Version 14.0
Operating System: Micrsoft Windows 10
*/

clear
set more off
capture log close

*-------------------------------Table 1------------------------------------*
use "promotion.dta", clear

*column (1)
probit promotion ability connectionc_yes i.location i.year if year<=2012, r
margins, dydx(connectionc_yes ability) //calculate marginal effects of connection and capability

*column (2)
probit promotion ability connectionc_yes college_onjob_yes mini_nat gender age age2  i.location  i.year if year<=2012, r
margins, dydx(connectionc_yes ability) //calculate marginal effects of connection and capability

*column (3)
probit promotion ability connectionc_yes i.location i.year if year>2012, r
margins, dydx(connectionc_yes ability) //calculate marginal effects of connection and capability

*column (4)
probit promotion ability connectionc_yes college_onjob_yes mini_nat gender age age2 i.year i.location if year>2012, r
margins, dydx(connectionc_yes ability) //calculate marginal effects of connection and capability

